// action 创建函数
import * as types from '../actionTypes/counter';

// 和下面的等价
// export const increment = (payload) => {
//     return {
//         type: 'increment',
//         payload: payload
//     }
// }
// 增加
export const increment = (payload) => ({
  // type: 'increment',
  type: types.INCREMENT,
  payload: payload,
});
// 减少
export const decrement = (payload) => ({
  type: types.DECREMENT,
  payload: payload,
});
